﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UtilZ.Tool.HostPluginBase
{
    /// <summary>
    /// web资源信息
    /// </summary>
    public class WebResourceInfo
    {
        /// <summary>
        /// 显示名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 描述说明
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 页面地址(相对于主程序目录),为null表示无交互页面
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 获取http api对象集合
        /// </summary>
        /// <returns>http api对象集合</returns>
        public object[] ApiObjs { get; set; }

        /// <summary>
        /// 获取http资源路径集合
        /// </summary>
        /// <returns>http资源路径集合</returns>
        public string[] HttpSourcePaths { get; set; }

        /// <summary>
        /// 是否启用Websocket[true:启用;false:禁用]
        /// </summary>
        public bool EnableWebsocket { get; set; }


        /// <summary>
        /// 构造函数
        /// </summary>
        public WebResourceInfo()
        {

        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="name">显示名称</param>
        /// <param name="description">描述说明</param>
        /// <param name="url">页面地址(相对于主程序目录)</param>
        public WebResourceInfo(string name, string description, string url)
        {
            this.Name = name;
            this.Description = description;
            this.Url = url;
        }

    }
}
